Integrand size = 29, antiderivative size = 33 \[ \int (a-a \csc (c+d x)) (A-A \csc (c+d x)) \sin (c+d x) \, dx=-2 a A x-\frac {a A \text {arctanh}(\cos (c+d x))}{d}-\frac {a A \cos (c+d x)}{d} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {21, 3873, 8, 4130, 3855} \[ \int (a-a \csc (c+d x)) (A-A \csc (c+d x)) \sin (c+d x) \, dx=-\frac {a A \text {arctanh}(\cos (c+d x))}{d}-\frac {a A \cos (c+d x)}{d}-2 a A x \]
[In]
[Out]
Rule 8
Rule 21
Rule 3855
Rule 3873
Rule 4130
Rubi steps \begin{align*} \text {integral}& = \frac {A \int (a-a \csc (c+d x))^2 \sin (c+d x) \, dx}{a} \\ & = \frac {A \int \left (a^2+a^2 \csc ^2(c+d x)\right ) \sin (c+d x) \, dx}{a}-(2 a A) \int 1 \, dx \\ & = -2 a A x-\frac {a A \cos (c+d x)}{d}+(a A) \int \csc (c+d x) \, dx \\ & = -2 a A x-\frac {a A \text {arctanh}(\cos (c+d x))}{d}-\frac {a A \cos (c+d x)}{d} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(72\) vs. \(2(33)=66\).
Time = 0.02 (sec) , antiderivative size = 72, normalized size of antiderivative = 2.18 \[ \int (a-a \csc (c+d x)) (A-A \csc (c+d x)) \sin (c+d x) \, dx=-2 a A x-\frac {a A \cos (c) \cos (d x)}{d}-\frac {a A \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {a A \log \left (\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {a A \sin (c) \sin (d x)}{d} \]
[In]
[Out]
Time = 0.41 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.97
method | result | size |
parallelrisch | \(-\frac {A a \left (2 d x -1-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\cos \left (d x +c \right )\right )}{d}\) | \(32\) |
parts | \(-\frac {a A \cos \left (d x +c \right )}{d}-\frac {A a \ln \left (\csc \left (d x +c \right )+\cot \left (d x +c \right )\right )}{d}-2 a A x\) | \(41\) |
derivativedivides | \(\frac {A a \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )-2 A a \left (d x +c \right )-A a \cos \left (d x +c \right )}{d}\) | \(44\) |
default | \(\frac {A a \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )-2 A a \left (d x +c \right )-A a \cos \left (d x +c \right )}{d}\) | \(44\) |
risch | \(-2 a A x -\frac {A a \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {A a \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {A a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {A a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}\) | \(76\) |
norman | \(\frac {\frac {2 A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-2 a A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 a A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}+\frac {A a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(94\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.55 \[ \int (a-a \csc (c+d x)) (A-A \csc (c+d x)) \sin (c+d x) \, dx=-\frac {4 \, A a d x + 2 \, A a \cos \left (d x + c\right ) + A a \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - A a \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{2 \, d} \]
[In]
[Out]
Time = 6.74 (sec) , antiderivative size = 82, normalized size of antiderivative = 2.48 \[ \int (a-a \csc (c+d x)) (A-A \csc (c+d x)) \sin (c+d x) \, dx=- 2 A a x + A a \left (\begin {cases} - \frac {\cot {\left (c + d x \right )}}{d \csc {\left (c + d x \right )}} & \text {for}\: d \neq 0 \\\frac {x}{\csc {\left (c \right )}} & \text {otherwise} \end {cases}\right ) + A a \left (\begin {cases} \frac {x \cot {\left (c \right )} \csc {\left (c \right )}}{\cot {\left (c \right )} + \csc {\left (c \right )}} + \frac {x \csc ^{2}{\left (c \right )}}{\cot {\left (c \right )} + \csc {\left (c \right )}} & \text {for}\: d = 0 \\- \frac {\log {\left (\cot {\left (c + d x \right )} + \csc {\left (c + d x \right )} \right )}}{d} & \text {otherwise} \end {cases}\right ) \]
[In]
[Out]
none
Time = 0.22 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.24 \[ \int (a-a \csc (c+d x)) (A-A \csc (c+d x)) \sin (c+d x) \, dx=-\frac {2 \, {\left (d x + c\right )} A a + A a \cos \left (d x + c\right ) + A a \log \left (\cot \left (d x + c\right ) + \csc \left (d x + c\right )\right )}{d} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.48 \[ \int (a-a \csc (c+d x)) (A-A \csc (c+d x)) \sin (c+d x) \, dx=-\frac {2 \, {\left (d x + c\right )} A a - A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + \frac {2 \, A a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1}}{d} \]
[In]
[Out]
Time = 18.96 (sec) , antiderivative size = 129, normalized size of antiderivative = 3.91 \[ \int (a-a \csc (c+d x)) (A-A \csc (c+d x)) \sin (c+d x) \, dx=\frac {A\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {2\,A\,a}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {4\,A\,a\,\mathrm {atan}\left (\frac {16\,A^2\,a^2}{8\,A^2\,a^2+16\,A^2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {8\,A^2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,A^2\,a^2+16\,A^2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \]
[In]
[Out]